fixed billing issues#626
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR hardens reliability across external API calls, RPC failover, and polling retry logic while optimizing cache TTLs. Five API routes now enforce request timeouts via ChangesReliability and Performance Hardening
Sequence Diagram(s)sequenceDiagram
participant Route as API Route
participant FWT as fetchWithTimeout
participant AC as AbortController
participant Ext as External Service
Route->>FWT: fetch with timeout config
FWT->>AC: create controller
FWT->>Ext: fetch with abort signal
alt Request succeeds
Ext-->>FWT: response
FWT-->>Route: return response
else Timeout fires
AC->>AC: abort signal
FWT->>Ext: cancel request
Ext-->>FWT: AbortError
FWT-->>Route: throw error
end
FWT->>FWT: finally clear timer
sequenceDiagram
participant Code as Caller
participant nearRpc as nearRpc.query
participant queryNRpc as queryNearRpc
participant Providers as RPC Providers
Code->>nearRpc: query request
nearRpc->>queryNRpc: route through selector
queryNRpc->>queryNRpc: sort by last success, skip cooldown
loop Try providers in order
queryNRpc->>Providers: attempt RPC call
alt Success
Providers-->>queryNRpc: response
queryNRpc->>queryNRpc: record success index
queryNRpc-->>nearRpc: return response
else Failure
Providers-->>queryNRpc: error
queryNRpc->>queryNRpc: mark unavailable, record failure
end
end
queryNRpc-->>nearRpc: throw last error if all fail
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Performance